package com.asiainfo.controller;

import com.asiainfo.annotation.Controller;
import com.asiainfo.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * 返回错误页面
 */
@Controller
@RequestMapping("/ym/error")
public class ErrorController
{

    @RequestMapping("/error")
    public void error(HttpServletRequest request, HttpServletResponse response) throws IOException {
        response.setStatus(404);
        response.setCharacterEncoding("utf-8");
        response.setContentType("application/json;charset=UTF-8");
        response.getWriter().write("error!");
    }

}
